namespace ScrumSprintMonitor.ConfigEditor.Views.SprintConfigurationEditorView
{
	#region #using Directives

	using System.ComponentModel;

	#endregion

	internal class BuildDefinitionItemViewModel : IBuildDefinitionItemViewModel
	{
		private bool isEnabled;

		public BuildDefinitionItemViewModel(string buildDefinitionName)
		{
			Name = buildDefinitionName;
		}

		#region IBuildDefinitionItemViewModel Members

		public string Name { get; private set; }

		public bool IsEnabled
		{
			get { return this.isEnabled; }
			set
			{
				if (value != this.isEnabled)
				{
					this.isEnabled = value;

					OnPropertyChanged("IsEnabled");
				}
			}
		}

		#endregion

		#region INotifyPropertyChanged members

		public event PropertyChangedEventHandler PropertyChanged;

		public void OnPropertyChanged(string propertyName)
		{
			if (PropertyChanged != null)
			{
				PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}

		#endregion
	}
}